/*
 * RenzoImage.h
 *
 *  Created on: Aug 30, 2009
 *      Author: sonhua
 */

#ifndef _RENZO_IMAGE_
#define _RENZO_IMAGE_

#include "RenzoMustHave.h"
#include "RenzoObject.h"

namespace Renzo {

class RENZODERER_API Image : public Object {
protected:
	Image();
	static Object* create();
	virtual ~Image();
	friend class ResourceManager;
public:	
	/**
	@description
	Pixel data is continuous on the memory (stride = width).
	Image will take care of the pointer void* pass in.
	Data stored at this location will be freed in the destructor. 
	Therefore outside should not delete this pointer.
	*/
	void initialize(void* pixels, PixelFormat fmt, Size size, String name);
	
/*
protected:
	ResourceID createResourceID();
*/

public:
	void*		getInternalData() const;
	PixelFormat getPixelFormat() const;
	Size		getSize() const;
	String		getName() const;	
protected:
	void* pixels;
	PixelFormat pixelFormat;
	Size size;
	String name;
};

}

#endif /* RENZOIMAGE_H_ */
